package de.wefunkdroid.core.data;

@SuppressWarnings("unchecked")
public class Track implements Comparable {

	String artist;
	String track;
	String msPos;

	public Track(String artist, String track, String msPos) {
		this.msPos = "0";
		this.artist = artist.replace("'","").replace("\"","");
		this.track = track.replace("'","").replace("\"","");;
		this.msPos = msPos;
	}

	public String getArtist() {
		return artist;
	}

	public void setArtist(String artist) {
		this.artist = artist.replace("'","").replace("\"","");;
	}

	public String getMsPos() {
		return msPos;
	}

	public void setMsPos(String msPos) {
		this.msPos = msPos;
	}

	public String getTrack() {
		return track;
	}

	public void setTrack(String track) {
		this.track = track.replace("'","").replace("\"","");;
	}

	public String toString() {
		return (new StringBuilder(String.valueOf(artist))).append(" - ")
				.append(getTrack()).toString();
	}

	public int compareTo(Object another) {
		return msPos.compareTo(((Track) another).msPos);
	}
}
